// 车险状态组件
<template>
<div class="set-status">

    <Row>
        <Col :span='8' v-for='(item, index) of conf' :key='index'>
            <div class="item">
                 <Button size='small' @click='req(item.key)'>
                    {{item.label}}
                </Button>
            </div>
        </Col>
    </Row>

</div>
</template>

<script lang='ts'>
import {Component, Prop, Vue} from 'vue-property-decorator'
import {store} from '@/store/index'

@Component({})
export default class setStatus extends Vue{
    name:string = 'set-status'
    
    req(key){

        let _vue:any = this;
        
        store.dispatch('request', {
            url: 'patch/order/id/status',
            data: {
                currentAction: key
            }
        }).then(success =>{

            if(success){
                _vue.$Notice.success({
                    title: '设置成功'
                })
            }
            
        })
        
    }
    
    conf = [

        {
            label: '暂存',
            key: '保存'
        },
        {
            label: '计费',
            key: '计费'
        },
        {
            label: '核保',
            key: '申请核保'
        },
        {
            label: '核保通过',
            key: '核保通过'
        },
        {
            label: '撤回核保',
            key: '撤回核保'
        },
        {
            label: '申请缴费',
            key: '申请缴费'  
        },
        {
            label: '待缴费',
            key: '待缴费'
        },
        {
            label: '转账',
            key: '转账'
        },
        {
            label: '缴费',
            key: '缴费'
        },
        {
            label: '刷出金额',
            key: '刷出金额'
        },
        {
            label: '已集印',
            key: '设置为已集印'
        },
        {
            label: '已打单',
            key: '设置已打单'
        },
        {
            label: '转业务',
            key: '转业务'
        }
        
    ]
    
}


</script>

<style scoped lang='scss'>

.item{

    padding: _rem(4px) 0;
    
}

</style>